<?php
namespace restphp\common\exploitation\upload\constant;

class RestUploadConstant {
    /**
     * upload config name.
     */
    const UPLOAD_CONFIG_NAME = "UPLOAD";
    /**
     * config name: right set of upload file.
     */
    const UPLOAD_CONFIG_NAME_RIGHT = 'right';
    /**
     * config name: form column name of upload file.
     */
    const UPLOAD_CONFIG_NAME_COLUMN_FILE = 'fileColumnName';
    /**
     * config name: form column name of right type.
     */
    const UPLOAD_CONFIG_NAME_COLUMN_RIGHT = 'rightColumnName';
    /**
     * config name: root dir for saving.
     */
    const UPLOAD_CONFIG_NAME_SAVE_ROOT = "saveRoot";
    /**
     * config name: start uri of file visit.
     */
    const UPLOAD_CONFIG_NAME_VISIT_URI = "visitUrlStart";
    /**
     * config name: max size of upload file.
     */
    const UPLOAD_CONFIG_NAME_SIZE_MAX = "maxSize";
    /**
     * config name: min size of upload file.
     */
    const UPLOAD_CONFIG_NAME_SIZE_MIN = "minSize";
    /**
     * config name: call back method of visit business.
     */
    const UPLOAD_CONFIG_NAME_BIZ_CALL_VISIT = "visitCall";
    /**
     * config name: before call back method of upload business.
     */
    const UPLOAD_CONFIG_NAME_BIZ_CALL_UPLOAD_BEFORE = "beforeCall";
    /**
     * config name: after call back method of upload business.
     */
    const UPLOAD_CONFIG_NAME_BIZ_CALL_UPLOAD_AFTER = "afterCall";
    /**
     * config name: right function's media.
     */
    const UPLOAD_CONFIG_NAME_RIGHT_SET_MEDIA = 'media';
    /**
     * upload config error.
     */
    const UPLOAD_CONFIG_ERROR = "UPLOAD_CONFIG_ERROR";

    /**
     * 不支持上传类型.
     */
    const UPLOAD_CONFIG_ERROR_NOT_EXISTS_RIGHT = "UPLOAD_CONFIG_ERROR_NOT_EXISTS_RIGHT";

    /**
     * 上传文件错误.
     */
    const UPLOAD_CONFIG_ERROR_FILE_ERROR = "UPLOAD_CONFIG_ERROR_FILE_ERROR";

    /**
     * 文件类型配置错误.
     */
    const UPLOAD_CONFIG_ERROR_MEDIA = "UPLOAD_CONFIG_ERROR_MEDIA";

    /**
     * 文件类型不支持.
     */
    const UPLOAD_ERROR_MEDIA_NOT_SUPPORT = "UPLOAD_ERROR_MEDIA_NOT_SUPPORT";

    /**
     * 上传文件大小不符合要求.
     */
    const UPLOAD_ERROR_FILE_SIZE = "UPLOAD_ERROR_FILE_SIZE";

    const UPLOAD_ERROR_FILE_SIZE_MAX = "UPLOAD_ERROR_FILE_SIZE_MAX";

    const UPLOAD_ERROR_FILE_SIZE_MIN = "UPLOAD_ERROR_FILE_SIZE_MIN";

    /**
     * 文件上传大小配置参数错误.
     */
    const UPLOAD_CONFIG_ERROR_FILE_SIZE = "UPLOAD_CONFIG_ERROR_FILE_SIZE";

    /**
     * 文件访问出错，不可识别的权限标识.
     */
    const UPLOAD_VISIT_ERROR_RIGHT_CODE_EMPTY = "UPLOAD_VISIT_ERROR_RIGHT_CODE_EMPTY";

    /**
     * 访问的文件不存在.
     */
    const UPLOAD_VISIT_ERROR_FILE_NOT_EXISTS = "UPLOAD_VISIT_ERROR_FILE_NOT_EXISTS";
}